package com.coolcard.risk.entity;

import com.coolcard.framework.base.BaseEntity;
import com.coolcard.risk.enums.RiskStatus;
import com.coolcard.risk.enums.RiskType;
import com.coolcard.system.enums.common.ManageLevel;
import com.coolcard.system.enums.project.ProjectStage;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 风险信息实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "e_risk_info")
public class RiskInfo extends BaseEntity {

    @Column(nullable = false)
    private String name;  // 风险名称

    @Column
    @Enumerated
    private RiskStatus status = RiskStatus.DRAFT;  // 状态

    @Column
    @Enumerated
    private RiskType type = RiskType.PROJECT_RISK;  // 风险类型

    @Column
    @Enumerated
    private ProjectStage projectStage;  // 型号研制阶段

    @Column
    private String product;  // 产品名称

    @Column
    @Enumerated
    private ManageLevel manageLevel;  // 管理级别

    @Column(length = 2000)
    private String content;  // 风险内容

    @Column(length = 2000)
    private String result;  // 控制结果

}
